package com.sxhalo.fsms.mapper;

import com.sxhalo.fsms.domain.DeviceSmartRunningData;
import com.sxhalo.fsms.domain.DeviceSmartRunningDataKey;
import com.sxhalo.fsms.domain.MotorRunningData;
import com.sxhalo.fsms.domain.RedisData;
import org.apache.ibatis.annotations.Param;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public interface DeviceSmartRunningDataMapper {
    int deleteByPrimaryKey(DeviceSmartRunningDataKey key);

    int insert(DeviceSmartRunningData record);

    int insertSelective(DeviceSmartRunningData record);

    DeviceSmartRunningData selectByPrimaryKey(DeviceSmartRunningDataKey key);

    int updateByPrimaryKeySelective(DeviceSmartRunningData record);

    int updateByPrimaryKey(DeviceSmartRunningData record);
    List<DeviceSmartRunningData> findPhaseHis(@Param("where")String where);

    List<HashMap> findAttrHis(@Param("attr")String  attr, @Param("where")String   where);
    int batchInsert(@Param("list") List<RedisData> list);


    //报警趋势数据
    List<Map<String,Object>> energyTrendStatistics(@Param("where")String where, @Param("type")Integer type);
    //环比
    Map<String,Object> getEnergyNumStatistics(@Param("where")String where);
    //曲线图标
    List<Map<String,Object>> getEnergyPhaseHis(@Param("where")String where);

    List<Map<String,Object>> getBeforReportCount(@Param("where")String where);
    //报表数据
    List<Map<String,Object>>  getEnergyReport(@Param("where")String where,@Param("where1")String where1,@Param("where2")String where2,@Param("type")String type);
}